package queue

import "cd-crawler/types"

type ResultQueue struct {
	ResultChan chan types.ParseResult
}

// 添加url
func (u *ResultQueue) Push(r types.ParseResult) {
	//fmt.Printf("urlManager;%+v\n", r)
	u.ResultChan <- r
}

// 取出url
func (u *ResultQueue) Pop() types.ParseResult {
	return <-u.ResultChan
}
